#!/usr/bin/perl
#restart.cgi

require './shutdown-lib.pl';
&ReadParse();
if ($in{'shuttype'} =~ /r/)
{
	`shutdown -r now`;
	&nas_syslog("shutdown", "naslog_info", 34000, "Restart the server now!");
	&redirect("");
}
elsif ($in{'shuttype'} =~ /h/)
{
	`shutdown -h now`;
	&nas_syslog("shutdown", "naslog_info", 34001, "Shutdown the server now!");
	&redirect("");
}
&redirect("");
